import store from "../store";
let topplayer = store.getters.getPlayerName
let placeHolderStyle = {
  normal: {
    color: "#fff",
    opacity: 0.1,
  },
  emphasis: {
    color: "#fff",
    opacity: 0.1,
  },
};
let option = {
  textStyle: {
    fontSize: 16,
    color: "#40E7F4 ",
  },
  tooltip: {
    trigger: "item",
    formatter: "{b}",
  },
  legend: {
    right: "1%",
    top: "center",
    align: "left",
    itemGap: 10,
    itemWidth: 10,
    itemHeight: 10,
    shadowBlur: 10,
    shadowOffsetY: 0,
    shadowOffsetX: 0,
    borderColor: "rgb(70,68,68)",
    borderWidth: 2,
    textStyle: {
      color: "#D8DDE3",
      fontSize: 12,
    },
    //data: ["客户经理", "发货人", "收货人", "司机", "我"],
    //orient: 'vertical',
    formatter(name) {
      return name;
    },
  },
  series: [
    {
      type: "pie",
      center:["30%","50%"],
      radius: ["11%", "18%"],
      label: false,
      startAngle: 90,
      clockWise: true, //顺时加载
      hoverAnimation: true,
      hoverOffset: 3,
      data: [
        {
          value: 4,
          name: topplayer[0],
          itemStyle: {
            color: {
              // 完成的圆环的颜色
              colorStops: [
                {
                  offset: 0,
                  color: "#57FF86", // 0% 处的颜色
                },
                {
                  offset: 1,
                  color: "#3AA5C7", // 100% 处的颜色
                },
              ],
            },
          },
        },
        {
          value: 4,
          hoverAnimation: false, //鼠标移入变大
          itemStyle: placeHolderStyle,
        },
      ],
    },
    {
      type: "pie",
      center:["30%","50%"],
      radius: ["28%", "35%"],
      label: false,
      startAngle: 288,
      clockWise: true,
      hoverAnimation: true,
      hoverOffset: 3,
      data: [
        {
          value: 3,
          name: topplayer[1],
          itemStyle: {
            color: {
              // 完成的圆环的颜色
              colorStops: [
                {
                  offset: 0,
                  color: "#A568FF", // 0% 处的颜色
                },
                {
                  offset: 1,
                  color: "#006CFF", // 100% 处的颜色
                },
              ],
            },
          },
        },
        {
          value: 3,
          hoverAnimation: false,
          itemStyle: placeHolderStyle,
        },
      ],
    },
    {
      type: "pie",
      center:["30%","50%"],
      radius: ["45%", "52%"],
      label: false,
      startAngle: 144,
      clockWise: true,
      hoverAnimation: true,
      hoverOffset: 3,
      data: [
        {
          value: 2,
          name: topplayer[2],
          itemStyle: {
            color: {
              // 完成的圆环的颜色
              colorStops: [
                {
                  offset: 0,
                  color: "#FFEA4F", // 0% 处的颜色
                },
                {
                  offset: 1,
                  color: "#F89212", // 100% 处的颜色
                },
              ],
            },
          },
        },
        {
          value: 2,
          hoverAnimation: false,
          itemStyle: placeHolderStyle,
        },
      ],
    },
    {
      type: "pie",
      center:["30%","50%"],
      radius: ["62%", "70%"],
      label: false,
      startAngle: 0,
      clockWise: true,
      hoverAnimation: true,
      hoverOffset: 3,
      data: [
        {
          value: 1,
          name: topplayer[3],
          itemStyle: {
            color: {
              // 完成的圆环的颜色
              colorStops: [
                {
                  offset: 0,
                  color: "#FF7671", // 0% 处的颜色
                },
                {
                  offset: 1,
                  color: "#A14AFF", // 100% 处的颜色
                },
              ],
            },
          },
        },
        {
          value: 1,
          hoverAnimation: false,
          itemStyle: placeHolderStyle,
        },
      ],
    },
    {
      type: "pie",
      center:["30%","50%"],
      radius: ["80%", "88%"],
      label: false,
      startAngle: 216,
      clockWise: true,
      hoverAnimation: true,
      hoverOffset: 3,
      data: [
        {
          value: 4,
          name: topplayer[4],
          itemStyle: {
            color: {
              // 完成的圆环的颜色
              colorStops: [
                {
                  offset: 0,
                  color: "#36EA4F", // 0% 处的颜色
                },
                {
                  offset: 1,
                  color: "#F36212", // 100% 处的颜色
                },
              ],
            },
          },
        },
        {
          value: 5,
          hoverAnimation: false,
          itemStyle: placeHolderStyle,
        },
      ],
    },
  ],
};

export {option}
